import Vue from 'vue'
import App from './App.vue'
import './permission' // permission control

import router from './router'

import './style/theme/index.css'
import Element from 'element-ui'

import './styles/index.scss' // global css
import Meta from 'vue-meta'
import '@/assets/iconfont/iconfont.js'
import '@/assets/iconfont/icon.css'
import 'font-awesome/css/font-awesome.min.css'
import '@/assets/highlight/styles/dark.min.css'


// 全局注册
// import with ES6
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
// use
Vue.use(mavonEditor)

import hljs from 'highlight.js' //导入代码高亮文件
import 'highlight.js/styles/googlecode.css'

// Vue.directive('highlight',function (el) {
//   let highlight = el.querySelectorAll('code,pre');
//   highlight.forEach((block)=>{
//       if(block){
//           hljs.highlightBlock(block);
//       }
//   })
// })

Vue.use(Meta)
Vue.config.productionTip = false
Vue.use(Element)

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
